log using tables_1_2, replace

***************** Replication of Franchino, Fabio, and Camilla Mariotto. “Bargaining Outcomes and Success in EU Economic Governance Reforms”. Political Science Research and Methods.

* Legend:
* nbs "nash bargaining solution, with reference point"
* nbs_norp "nash bargaining solution, without reference point"
* comp "compromise model, without reference point"
* comp2 "compromise model, 6-country power in QMV without reference point"
* comp3 "compromise model (Thomson power weights), without reference point"
* m_mean "mean model solution"
* minimax "minimax solution"
* PROCrp "procedural model with reference point"
* PROCnorp "procedural model without reference point"

***************** Table 1
version 15
pause on

use data_signtest.dta, clear

* Cells for Table 1 (means and st.dev)
* The sum commands listed below reproduce the means and standard deviations reported in Table 1

sum outcome /* mean and standard deviation - row 1 column 1 in Table 1 */

gen PROCrpAD=abs( PROCrp - outcome )
label variable PROCrpAD "=abs( PROCrp - outcome )"
sum PROCrpAD /* mean and standard deviation - row 2 column 1 in Table 1 */

sum PROCrp /* mean and standard deviation - row 2 column 2 in Table 1 */

gen PROCnorpAD = abs( PROCnorp - outcome )
label variable PROCnorpAD " =abs( PROCnorp - outcome )"
sum PROCnorpAD

sum PROCnorp

gen PROCnorpPROCrpAD = abs( PROCnorp - PROCrp )
label variable PROCnorpPROCrpAD " =abs( PROCnorp - PROCrp )"
sum PROCnorpPROCrpAD

gen nbsAD=abs( nbs - outcome )
label variable nbsAD "=abs( nbs - outcome )"
sum nbsAD

sum nbs

gen nbsPROCrpAD = abs( nbs - PROCrp )
label variable nbsPROCrpAD " =abs( nbs - PROCrp )"
sum nbsPROCrpAD

gen nbsPROCnorpAD = abs( nbs - PROCnorp )
label variable nbsPROCnorpAD " =abs( nbs - PROCnorp )"
sum nbsPROCnorpAD

gen nbs_norpAD=abs( nbs_norp - outcome )
label variable nbs_norpAD "=abs( nbs_norp - outcome )"
sum nbs_norpAD

sum nbs_norp

gen nbs_norpPROCrpAD = abs( nbs_norp - PROCrp )
label variable nbs_norpPROCrpAD " =abs( nbs_norp - PROCrp )"
sum nbs_norpPROCrpAD

gen nbs_norpPROCnorpAD = abs( nbs_norp - PROCnorp )
label variable nbs_norpPROCnorpAD " =abs( nbs_norp - PROCnorp )"
sum nbs_norpPROCnorpAD

gen nbs_norpnbsAD = abs( nbs_norp - nbs )
label variable nbs_norpnbsAD " =abs( nbs_norp - nbs )"
sum nbs_norpnbsAD

gen compAD=abs( comp - outcome )
label variable compAD "=abs( comp - outcome )"
sum compAD

sum comp

gen compPROCrpAD = abs( comp - PROCrp )
label variable compPROCrpAD " =abs( comp - PROCrp )"
sum compPROCrpAD

gen compPROCnorpAD = abs( comp - PROCnorp )
label variable compPROCnorpAD " =abs( comp - PROCnorp )"
sum compPROCnorpAD

gen compnbsAD = abs( comp - nbs )
label variable compnbsAD " =abs( comp - nbs )"
sum compnbsAD

gen compnbs_norpAD = abs( comp - nbs_norp )
label variable compnbs_norpAD " =abs( comp - nbs_norp )"
sum compnbs_norpAD

gen m_meanAD=abs( m_mean - outcome )
label variable m_meanAD "=abs( m_mean - outcome )"
sum m_meanAD

sum m_mean

gen m_meanPROCrpAD = abs( m_mean - PROCrp )
label variable m_meanPROCrpAD " =abs( m_mean - PROCrp )"
sum m_meanPROCrpAD

gen m_meanPROCnorpAD = abs( m_mean - PROCnorp )
label variable m_meanPROCnorpAD " =abs( m_mean - PROCnorp )"
sum m_meanPROCnorpAD

gen m_meannbsAD = abs( m_mean - nbs )
label variable m_meannbsAD " =abs( m_mean - nbs )"
sum m_meannbsAD

gen m_meannbs_norpAD = abs( m_mean - nbs_norp )
label variable m_meannbs_norpAD " =abs( m_mean - nbs_norp )"
sum m_meannbs_norpAD

gen m_meancompAD = abs( m_mean - comp )
label variable m_meancompAD " =abs( m_mean - comp )"
sum m_meancompAD

gen minimaxAD=abs( minimax - outcome )
label variable minimaxAD "=abs( minimax - outcome )"
sum minimaxAD

sum minimax

gen minimaxPROCrpAD = abs( minimax - PROCrp )
label variable minimaxPROCrpAD " =abs( minimax - PROCrp )"
sum minimaxPROCrpAD

gen minimaxPROCnorpAD = abs( minimax - PROCnorp )
label variable minimaxPROCnorpAD " =abs( minimax - PROCnorp )"
sum minimaxPROCnorpAD

gen minimaxnbsAD = abs( minimax - nbs )
label variable minimaxnbsAD " =abs( minimax - nbs )"
sum minimaxnbsAD

gen minimaxnbs_norpAD = abs( minimax - nbs_norp )
label variable minimaxnbs_norpAD " =abs( minimax - nbs_norp )"
sum minimaxnbs_norpAD

gen minimaxcompAD = abs( minimax - comp )
label variable minimaxcompAD " =abs( minimax - comp )"
sum minimaxcompAD

gen minimaxm_meanAD = abs( minimax - m_mean )
label variable minimaxm_meanAD " =abs( minimax - m_mean )"
sum minimaxm_meanAD

* Two-sided sign tests that the median of the differences is different from zero
* column 1
signtest	outcome	=	sq /* Two-sided sign test row 1 column 1 */

signtest	outcome	=	PROCrp /* Two-sided sign test row 2 column 1 */
signtest	outcome	=	PROCnorp /* Two-sided sign test row 3 column 1 */
signtest	outcome	=	nbs
signtest	outcome	=	nbs_norp
signtest	outcome	=	comp
signtest	outcome	=	m_mean
signtest	outcome	=	minimax

* column 2
signtest	sq	=	PROCrp
signtest	sq	=	PROCnorp
signtest	sq	=	nbs
signtest	sq	=	nbs_norp
signtest	sq	=	comp
signtest	sq	=	m_mean
signtest	sq	=	minimax

* column 3
signtest	PROCrp	=	PROCnorp
signtest	PROCrp	=	nbs
signtest	PROCrp	=	nbs_norp
signtest	PROCrp	=	comp
signtest	PROCrp	=	m_mean
signtest	PROCrp	=	minimax

* column 4
signtest	PROCnorp	=	nbs
signtest	PROCnorp	=	nbs_norp
signtest	PROCnorp	=	comp
signtest	PROCnorp	=	m_mean
signtest	PROCnorp	=	minimax

* column 5
signtest	nbs	=	nbs_norp
signtest	nbs	=	comp
signtest	nbs	=	m_mean
signtest	nbs	=	minimax

* column 6
signtest	nbs_norp	=	comp
signtest	nbs_norp	=	m_mean
signtest	nbs_norp	=	minimax

* column 7
signtest	comp	=	m_mean
signtest	comp	=	minimax

* column 8
signtest	m_mean	=	minimax


***************** Table 2
* Cells and one-sided sign tests
* The table after the command displays the cells in Table 2
* Below are the one-sided sign tests
signtest	PROCrpAD	=	PROCnorpAD /* cells entries column 1 rows 1-3 and one-sided sign tests*/
signtest	PROCrpAD	=	nbsAD /* cells entries column 1 rows 4-6 and one-sided sign tests*/
signtest	PROCrpAD	=	nbs_norpAD
signtest	PROCrpAD	=	compAD
signtest	PROCrpAD	=	m_meanAD
signtest	PROCrpAD	=	minimaxAD

signtest	PROCnorpAD	=	nbsAD
signtest	PROCnorpAD	=	nbs_norpAD
signtest	PROCnorpAD	=	compAD
signtest	PROCnorpAD	=	m_meanAD
signtest	PROCnorpAD	=	minimaxAD

signtest	nbsAD	=	nbs_norpAD
signtest	nbsAD	=	compAD
signtest	nbsAD	=	m_meanAD
signtest	nbsAD	=	minimaxAD

signtest	nbs_norpAD	=	compAD
signtest	nbs_norpAD	=	m_meanAD
signtest	nbs_norpAD	=	minimaxAD

signtest	compAD	=	m_meanAD
signtest	compAD	=	minimaxAD

signtest	m_meanAD	=	minimaxAD


log close



